package com.zdkj.subway.stm.util;

public class CalculateUtil {
    /**
     * 计算多个int类型的和
     * @param numbers
     * @return
     */
    public static int sumOfNumbers(Integer... numbers) {
        if (numbers == null) {
            return 0;
        }
        int sum = 0;
        for (Integer number : numbers) {
            if (number != null) {
                sum += number;
            }
        }
        return sum;
    }
}
